using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemiesController : MonoBehaviour
{

    protected Animator anim;
    protected AudioSource deathAudio;
    // Start is called before the first frame update
    protected virtual void Start()
    {
        anim = GetComponent<Animator>();
        deathAudio = GetComponent<AudioSource>();
    }


    public void Death(){
        Destroy(gameObject);
    }

    public void JumpOn(){
        deathAudio.Play();
        anim.SetTrigger("deathing");
    }


}
